package myblog.action;

import java.util.ArrayList;
import java.util.List;

import myblog.service.ReviewService;
import myblog.vo.ReviewVo;

import com.opensymphony.xwork2.ActionSupport;

public class ReviewAction extends ActionSupport {
	private ReviewService service;

	private List<ReviewVo> reviewList = new ArrayList<ReviewVo>();

	private ReviewVo review = null;

	private int reviewid;

	public String list() {

		reviewList = service.list();

		return "list";
	}

	public String add() {

		service.addReview(review);

		return "list";
	}

	public void setService(ReviewService service) {
		this.service = service;
	}

	public List<ReviewVo> getreviewList() {
		return reviewList;
	}

	public void setreviewList(List<ReviewVo> reviewList) {
		this.reviewList = reviewList;
	}

	public ReviewVo getreview() {
		return review;
	}

	public void setreview(ReviewVo review) {
		this.review = review;
	}

	public int getreviewid() {
		return reviewid;
	}

	public void setreviewid(int reviewid) {
		this.reviewid = reviewid;
	}

	

}
